﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using cludg.Web.Core.Validation;
using cludg.Web.Core.ViewModels;

namespace cludg.Web.ViewModels
{
	public class OfferModel : BaseModel
	{
		[DisplayName("Ссылка на контент (изображение)")]
		[RegularExpression(ValidationConst.ImageUrlRegEx, ErrorMessage = ValidationConst.ImageUrlErrorMessage)]
		public string ImageContentUrl { get; set; }

		[DisplayName("Описание")]
		[StringLength(500, ErrorMessage = ValidationConst.StringLengthMaxInvalidMessage)]
		public string Comment { get; set; }

		[DisplayName("Заголовок")]
		[StringLength(200, ErrorMessage = ValidationConst.StringLengthMaxInvalidMessage)]
		public string Title { get; set; }

		[DisplayName("Имя автора")]
		[StringLength(50, ErrorMessage = ValidationConst.StringLengthMaxInvalidMessage)]
		public string AnonymouseAuthorName { get; set; }

		public readonly string ImageUploadFileName = "imageUpload";

	}
}